package com.back_end.ClassTest;

public class CarClass {

    Integer  age;
    String s = null;
    public static void main(String[] args) {

        CarClass carClass1 = new CarClass();
        CarClass carClass2 = new CarClass();
        CarClass carClass3 = new CarClass();

        System.out.println(carClass1.hashCode());
        System.out.println(carClass2.hashCode());
        System.out.println(carClass3.hashCode());

        //所有car都是同一个class
        Class<? extends CarClass> aClass1 = carClass1.getClass();

        ClassLoader classLoader = aClass1.getClassLoader();
        System.out.println(classLoader);//AppClassLoader ClassLoader类
        System.out.println(classLoader.getParent());//ExtClassLoader  \jre\lib\ext
        System.out.println(classLoader.getParent().getParent());//null 1.不存在 2.java程序获取不到  rt.jar


    }

}
